﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LoginPanel.ascx.cs" Inherits="FortuneHeaven.Web.Controls.LoginPanel" %>
<script type="text/javascript">
    $(document).ready(function () {
        $(".mark").keydown(function (event) {
            if (event.which == 13 && checkvalue()) {
                event.cancelBubble = true;
                event.returnValue = false;
                __doPostBack('<%=lbSubmit.ClientID.Replace("_","$")%>', '');

                return false;
            }
        });
    });
             function checkvalue() {
                 var t1 = $('#<%=tbAccount.ClientID%>');
                 var t2 = $('#<%=tbPassword.ClientID%>');
                 var t3 = $('#<%=tbValidateCode.ClientID%>');
                 var b = $('#<%=lbSubmit.ClientID%>');
                 if (!t1.val()) {
                     alert("请输入帐号");
                     return false;
                 }
                 if (!t2.val()) {
                     alert("请输入密码");
                     return false;
                 }
                 if (!t3.val()) {
                     alert("请输入验证码");
                     return false;
                 }
                 return true;
             }
             function Refresh() {
                 document.getElementById('validateimg').src = '<%=ResolveUrl("~/ValidationCode.ashx")%>?n=' + Math.random();
             }
</script>
<style>
.imgsize
{
    width:60px;height:18px;
    margin-left:10px;
    }
</style>
            <div class="loginbar">
                <div class="download">
                    <a href="http://www.cftt88.com/Download/cfttplazefull.exe">
                        <img src="<%=ResolveUrl("~/Content/Image/Main/download.gif")%>"></a></div>
                <div id="divLogin" runat="server">
                <div style="margin:5px auto 10px 5px; "><h3 style=" color:Blue;  height:16px;"></h3> </div>
                <div class="register">
                    <div class="rleft">
                        <p>
                            账号:&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="tbAccount" TextMode="SingleLine" CssClass="mark" inputvalue runat="server" Text=""></asp:TextBox></p>
                        <p>
                            密码:&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="tbPassword"  CssClass="mark" inputvalue TextMode="Password" runat="server" Text=""></asp:TextBox></p>
                       
                    </div>
                    <div class="rright">
                    <asp:LinkButton OnClientClick="return checkvalue();" OnClick="LoginUser" ID="lbSubmit" runat="server"><img src="<%=ResolveUrl("~/Content/Image/Main/bg-04.jpg")%>"></asp:LinkButton>
                            </div>
                    <div class="clear">
                  
                    </div>
                     <p>
                            验证码:<asp:TextBox ID="tbValidateCode" TextMode="SingleLine" CssClass="valideinput mark" inputvalue runat="server" Text=""></asp:TextBox> <img style="border-width:0px;cursor: pointer; margin-left:5px; width:50px; height:17px; " id='validateimg' src="<%=ResolveUrl("~/ValidationCode.ashx")%>" onclick="this.src='<%=ResolveUrl("~/ValidationCode.ashx")%>?n='+ Math.random();" class="validecode" title="点击刷新验证码。"> <a style=" text-decoration:underline" href="javascript:Refresh();">刷新</a></p>
                </div> 
                <div class="password">
                    <a class="one" style=" width:99px;  line-height:30px; height:30px; font-size:14px; text-align:center;" href='<%= Page.ResolveUrl("~/Pages/UserCenter/ResetPassword.aspx") %>'>忘记密码？</a><a class="two"  style=" width:55px; line-height:30px; font-size:14px;height:30px; text-align:center;"  href="<%= Page.ResolveUrl("~/Pages/UserCenter/UserRegister.aspx") %>">注册</a></div>
                </div>
                <div id="divAfterLogin" runat="server">
                    <div style="margin:5px auto 5px 5px; "><span style="color:Blue; font-size:small; line-height:20px;">欢迎你:</span><asp:Label ID="lbName" runat="server"> </asp:Label> <asp:LinkButton ID="lbUnlogin" runat="server" OnClick="UnLogin" style=" text-decoration:underline;"  >注销</asp:LinkButton> </div>
                    <div style="float:left;width:90px; height:90px;margin-left:5px;">
                        <asp:Image ID="imgHead" runat="server" style=" width:90px; height:90px;" />
                    </div>
                    <div style="float:left;  margin-left:10px;">
                        <ul style ="list-style-type:none ">
                            <li style=" margin-top:5px;">游戏ID:<asp:Label ID="lbID" runat="server"></asp:Label></li>
                            <li style=" margin-top:1px;">财富值:<asp:Label ID="lbTreasure" runat="server"></asp:Label><a href="javascript://"><img  src="<%=ResolveUrl("~/Content/Image/Main/chargemon.jpg")%>"/></a></li>
                            <li style=" margin-top:1px;">堂豆:<asp:Label ID="lbGameScore" runat="server"></asp:Label></li>
                             <li style=" margin-top:1px;">推广积分:<asp:Label ID="lbSpread" runat="server"></asp:Label></li>
                        </ul>
                    </div>
                    <div style=" clear:both"></div>
                    <div class="centergo" style=" text-align:center;margin-top:4px " >
                    <a href="<%=ResolveUrl("~/Pages/UserCenter/UserInformation.aspx")%>">
                        <img src="<%=ResolveUrl("~/Content/Image/Main/bg-07.jpg")%>" /></a></div>
                </div>
            </div>